<?php 
  	class MY_Controller extends CI_Controller{
		public function __construct(){
			parent::__construct();
			$this->load->library("session");
            $this->load->helper('main_helper');
			$this->load->model("model_train");
			$this->load->model("model_home");

            //$this->output->enable_profiler();
		}
		public function fillter($str){
			$str = str_replace("<", "&lt;", $str);
			$str = str_replace(">", "&gt;", $str);
			$str = str_replace("&", "&amp;", $str);			
			$str = str_replace("|", "&brvbar;", $str);
			$str = str_replace("~", "&tilde;", $str);
			$str = str_replace("`", "&lsquo;", $str);
			$str = str_replace("#", "&curren;", $str);
			$str = str_replace("%", "&permil;", $str);
			$str = str_replace("'", "&rsquo;", $str);
			$str = str_replace("\"", "&quot;", $str);
			$str = str_replace("\\", "&frasl;", $str);
			$str = str_replace("--", "&ndash;&ndash;", $str);
			$str = str_replace("ar(", "ar&Ccedil;", $str);
			$str = str_replace("Ar(", "Ar&Ccedil;", $str);
			$str = str_replace("aR(", "aR&Ccedil;", $str);
			$str = str_replace("AR(", "AR&Ccedil;", $str);
			return htmlspecialchars($str);
		}
		public function plantrip($limit){
			return $this->model_train->plantrip($limit);
		}
		public function listtrains($limit){
			return $this->model_train->listtrains($limit);
		}
        public function debug($val){
		    echo "<pre>";
		    print_r($val);
		    echo "</pre>";
		    die();
		}
	}